// Copyright 叶湘 ( weixin:yexiang841, email:yexiang841@qq.com ), Shitouren Studio. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Hit/Q3D_CPPE_HitMode.h"
#include "Q3D_CPPU_HitMode.generated.h"

class UQ3D_CPPU_Hit;
class UQ3D_CPPU_PropertyPLIPro;

/**
 * 
 */
UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "命中模式基类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeBase : public UObject
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Q3D_HitModeBase, meta = (Tooltip = "对Hit的引用", ExposeOnSpawn = "true"))
	UQ3D_CPPU_Hit *Ptr_U_Hit;

public:
	UFUNCTION(BlueprintPure, Category = Q3D_HitModeBase, meta = (Tooltip = "读取命中模式"))
	virtual void Q3D_F_HitMode_GetEnum(UPARAM(DisplayName = "enum_hit_mode") EQ3D_CPPE_HitMode &enum_hit_mode) const;

	UFUNCTION(BlueprintCallable, Category = Q3D_HitModeBase, meta = (Tooltip = "由HitTarget调用：开始执行命中"))
	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, UPARAM(DisplayName = "bool_success") bool &bool_success, UPARAM(DisplayName = "string_log") FString &string_log);

	UFUNCTION(BlueprintCallable, Category = Q3D_HitModeBase, meta = (Tooltip = "由HitTarget调用：取消执行命中(不会对Hit_Once类型起作用)"))
	virtual void Q3D_F_Hit_Cancel(UPARAM(DisplayName = "bool_success") bool &bool_success, UPARAM(DisplayName = "string_log") FString &string_log);
};

UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "单次命中模式类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeHitOnce : public UQ3D_CPPU_HitModeBase
{
	GENERATED_BODY()

public:
	virtual void Q3D_F_HitMode_GetEnum(EQ3D_CPPE_HitMode &enum_hit_mode) const override;

	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, bool &bool_success, FString &string_log);

	virtual void Q3D_F_Hit_Cancel(bool &bool_success, FString &string_log);
};

UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "多次命中模式类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeHitMultiple : public UQ3D_CPPU_HitModeBase
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "命中次数设定", ExposeOnSpawn = "true"))
	int32 Int_HitCount;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "命中多次发生的时间间隔", ExposeOnSpawn = "true"))
	float Float_HitInterval;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "命中计数器"))
	int32 Int_HitCountIter;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "对目标属性的引用"))
	UQ3D_CPPU_PropertyPLIPro *Ptr_U_PropertyPLIPro;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "多次执行定时器"))
	FTimerHandle TH_Hit_Executor;

public:
	virtual void Q3D_F_HitMode_GetEnum(EQ3D_CPPE_HitMode &enum_hit_mode) const override;

	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, bool &bool_success, FString &string_log);

	virtual void Q3D_F_Hit_Cancel(bool &bool_success, FString &string_log);

protected:
	UFUNCTION(BlueprintCallable, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "工具函数，单次执行命中"))
	void _F_Hit_Execute();
};

UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "持续命中模式类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeHitInfinite : public UQ3D_CPPU_HitModeBase
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitInfinite, meta = (Tooltip = "命中多次发生的时间间隔"))
	float Float_HitInterval;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitInfinite, meta = (Tooltip = "对目标属性的引用"))
	UQ3D_CPPU_PropertyPLIPro *Ptr_U_PropertyPLIPro;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "多次执行定时器"))
	FTimerHandle TH_Hit_Executor;

public:
	virtual void Q3D_F_HitMode_GetEnum(EQ3D_CPPE_HitMode &enum_hit_mode) const override;

	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, bool &bool_success, FString &string_log);

	virtual void Q3D_F_Hit_Cancel(bool &bool_success, FString &string_log);

protected:
	UFUNCTION(BlueprintCallable, Category = Q3D_HitModeHitInfinite, meta = (Tooltip = "工具函数，单次执行命中"))
	void _F_Hit_Execute();
};

UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "持续光环命中模式类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeHaloConst : public UQ3D_CPPU_HitModeBase
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHaloConst, meta = (Tooltip = "对目标属性的引用"))
	UQ3D_CPPU_PropertyPLIPro *Ptr_U_PropertyPLIPro;

public:
	virtual void Q3D_F_HitMode_GetEnum(EQ3D_CPPE_HitMode &enum_hit_mode) const override;

	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, bool &bool_success, FString &string_log);

	virtual void Q3D_F_Hit_Cancel(bool &bool_success, FString &string_log);
};

UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "计时光环命中模式类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_HitModeHaloTimed : public UQ3D_CPPU_HitModeBase
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitInfinite, meta = (Tooltip = "光环持续的时间"))
	float Float_HaloTime;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHaloTimed, meta = (Tooltip = "对目标属性的引用"))
	UQ3D_CPPU_PropertyPLIPro *Ptr_U_PropertyPLIPro;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_HitModeHitMultiple, meta = (Tooltip = "光环计时器"))
	FTimerHandle TH_Halo_Terminator;

public:
	virtual void Q3D_F_HitMode_GetEnum(EQ3D_CPPE_HitMode &enum_hit_mode) const override;

	virtual void Q3D_F_Hit_Execute(UQ3D_CPPU_PropertyPLIPro *ptr_u_property_pli_pro, bool &bool_success, FString &string_log);

	virtual void Q3D_F_Hit_Cancel(bool &bool_success, FString &string_log);

protected:
	UFUNCTION(BlueprintCallable, Category = Q3D_HitModeHitInfinite, meta = (Tooltip = "工具函数，光环终结"))
	void _F_Hit_Cancel();
};
